package springcloud.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.buba.springcloud.pojo.ChinaData;
import com.buba.springcloud.pojo.ProvinceData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import springcloud.mapper.ChinaDataMapper;
import springcloud.mapper.DataMapper;
import springcloud.service.IChinaDataService;
import springcloud.service.IDataService;


@Slf4j
@Service
public class ChinaDataServiceImpl extends ServiceImpl<ChinaDataMapper, ChinaData> implements IChinaDataService {

    @Override
    public ChinaData getChinaData() {

        QueryWrapper<ChinaData> lqw = new QueryWrapper<ChinaData>();
        lqw.orderByDesc("id").last("limit 1");
        return super.getOne(lqw);
    }
}
